import {getBannerList, getCategoryList, getFloor} from '@/ajax'
const state = {
  CategoryList: [],
  bannerList: [],
  floor: []
}
const mutations = {
  getCategoryList(state,data) {
    state.CategoryList = data
  },
  getBannerList(state,data) {
    state.bannerList = data
  },
  getFloor(state,data) {
    state.floor = data
  }
}
const actions = {
  async getCategoryList({commit}) {
    const {data} = await getCategoryList()
    commit('getCategoryList',data)
  },
  async getBannerList({commit}) {
    const {data} = await getBannerList()
    commit('getBannerList',data)
  },
  async getFloor({commit}) {
    const {data} = await getFloor()
    commit('getFloor',data)
  }
}
const getters = {

}
export default {
  state,
  mutations,
  actions,
  getters
}